var ChatLocationMsg = (function(){   
    
    var _locationMsgTmp = [
        '<div><img class="locImgMsg" src="<%= o.img %>" style="cursor:pointer;" /></div>'
    ].join('');
     
    var _chatLocationMsg = (function ChatLocationMsg(){        
    }).extend(ChatMsg, 'ChatLocationMsg'); 
    
    _chatLocationMsg.prototype._init = function(){
        var _this = this;
        var $image = $(tmpl(_locationMsgTmp, this.msg));
        
        $image.on('error', function(){
            $(this).attr('src', '/ujs/app/im/images/default.png');    
        });
        this.$wrapper.find('.chatMsgItemContent').prepend($image);                
        $image.find('.locImgMsg').on('click', function(){
            var dialog = new ShareLocDialog({
                loc : _this.msg.loc,
                bodyStyle : 'margin:0px',
                toolbar : false
            });
            dialog.show();
        });
    };    
    return _chatLocationMsg;
})();